package com.danger.Activity;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.danger.Fragment.IndexFragment;

public class MainActivity extends BaseActivity {

    private Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initView();

        if (savedInstanceState == null) {
            getFragmentManager().beginTransaction().add(R.id.container, new IndexFragment()).commit();
        }
    }

    @Override
    public void initView() {
        toolbar = (Toolbar) findViewById(R.id.toolbar);
    }

    @Override
    public void initEvent() {

    }

    public Toolbar getToolbar() {
        return toolbar;
    }
}